/**
 * Create by yxk at 2020/7/28 0028
 */
import request from 'UTIL/request'

/**
 * 新增/编辑时查询字段
 */
export function QueryFieldList(params) {
  const query = params && params.id ? `/${params.id}` : ''
  return request({
    url: `crmReceivablesPlan/field${query}`,
    method: 'POST',
    data: params,
		requestType: 'form'
  })
}

/**
 * 回款计划创建
 * @param params
 */
export function AddReceivablesPlan(params) {
  return request({
    url: 'crmReceivablesPlan/add',
    method: 'POST',
    data: params
  })
}

/**
 * 回款计划修改
 * @param params
 */
export function UpdateReceivablesPlan(params) {
  return request({
    url: 'crmReceivablesPlan/update',
    method: 'POST',
    data: params
  })
}

/**
 * 回款计划删除
 * @param params
 */
export function DeleteByIds(params) {
  return request({
    url: 'crmReceivablesPlan/deleteByIds',
    method: 'POST',
    data: params
  })
}

/**
 * 查询未被使用的回款计划
 */
export function QueryByContractAndCustomer(params) {
  return request({
    url: 'crmReceivablesPlan/queryByContractAndCustomer',
    method: 'POST',
    data: params
  })
}
